package com.fxu;

import cn.hutool.core.collection.CollUtil;
import com.fxu.framework.biz.util.ErrorUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@RequiredArgsConstructor
public class GenRunner implements CommandLineRunner {

    @Override
    public void run(String... args) {
        System.out.println("GenRunner...");
        ErrorUtil.ErrorInfo errorInfo = new ErrorUtil.ErrorInfo();
        errorInfo.setCode(501);
        errorInfo.setZh("中文");
        errorInfo.setEn("英文");
        errorInfo.setFra("法文");
        errorInfo.setCht("繁体");
        errorInfo.setMn("蒙古文");

        ErrorUtil.init(CollUtil.toList(errorInfo));
    }

}
